﻿@using System.Configuration;

<!DOCTYPE html>
<html>
<head>
    <title>@ViewBag.Title</title>
    <link rel="SHORTCUT ICON" href="@Url.Content("~/favicon.ico")" type="image/x-icon">
    <link rel="stylesheet" href="@Url.Content("~/OpenID/openid.css")" />

    @(new HtmlString(Combres.WebExtensions.CombresLink("siteCss")))
    @(new HtmlString(Combres.WebExtensions.CombresLink("siteJs")))

    <!-- Loading Syntaxes -->
    <link href="@Url.Content("~/Syntax/css/sh_" + ConfigurationManager.AppSettings["HighlighterStyle"] + ".min.css")" rel="stylesheet" type="text/css" />
    @foreach (String language in ConfigurationManager.AppSettings["Syntaxes"].Replace(" ", "").Split(','))
    {
        <script src="@Url.Content("~/Syntax/lang/sh_" + language + ".min.js")" type="text/javascript"></script>
    }
</head>

<body>
    <div id="head" class="container_12">
        <div class="grid_12">
            @Html.Partial("_HeaderPartial")
	    </div>
	    <div class="clear"></div>
    </div>
    <div class="container_12">
        <div class="grid_12">
            @Html.Partial("_SearchPartial")
	    </div>
	    <div class="clear"></div>
    </div>
    <div id="page" class="container_12">
        <div class="grid_12">
            @RenderBody()
	    </div>
	    <div class="clear"></div>
    </div>
    <div id="foot" class="container_12">
        <div class="grid_12">
            @Html.Partial("_LogOnPartial")
	    </div>
        <div class="clear"></div>
        <div class="grid_12">
	    </div>
	    <div class="clear"></div>
    </div>
    <script type="text/javascript" src="@Url.Content("~/OpenID/openid-jquery.js")"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            openid.init('openid_identifier', '@Url.Content("~/Content/images/")');
            sh_highlightDocument();

            $('.button').button();
            $('textarea').htmlarea({
                toolbar: [
                    ['html'],
                    ['bold', 'italic', 'underline', 'strikethrough', '|', 'subscript', 'superscript', '|', 'justifyleft', 'justifycenter', 'justifyright'],
                    ['increasefontsize', 'decreasefontsize', '|', 'indent', 'outdent'],
                    ['orderedlist', 'unorderedlist'],
                    ['p', '|', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'],
                    ['link', 'unlink', '|', 'image', '|', 'horizontalrule'],
                    ['cut', 'copy', 'paste']
                ]
            });

            $('.ajax-form').ajaxForm({
                success: function (responseText, statusText, xhr, $form) {
                    if (responseText != "") {
                        $('iframe').focus();
                        $('textarea').htmlarea("image", responseText);
                        $('.dialog').dialog('close');
                    }
                }
            });

            $('.dialog').dialog({
                modal: true,
                resizable: false,
                draggable: false,
                autoOpen: false
            });

            $('#searchBox input').focus();
        });
    </script>
</body>
</html>
